<template>
    <div class="hello">
        <button @click="clickHandler">点击</button>
        {{count}}
    </div>
</template>

<script>

export default {
    name: 'hello',
    computed: {
        count() {
            return this.$store.state.model.count
        }
    },
    methods: {
        clickHandler() {
            this.$store.dispatch({ type: 'model/increment', count: 10})
        }
    }
}
</script>

<style lang="less" scoped>

</style>
